<template>
	<view >
		<uni-list v-for="(item,index) in data" :key="index">
			<view class="container" @click="goToDetailPage(item)">
				<h2 class="name">{{item.name}}</h2>
				<view class="player_container">
					<p class="player_title">团长:</p>
					<p class="player">{{item.player}}</p>
				</view>
				<view class="number_container">
					<p class="number_title">团队人数:</p>
					<p class="number">{{item.number}}/{{item.max}}</p>
				</view>
				
			</view>
		</uni-list>
	</view>
</template>

<script>
	export default {
		onLoad() {
		   // 设置页面标题  
		   uni.setNavigationBarTitle({  
		     title: '我参与的团'  
		   });
		   // uni.request({
		   //   url: '', //地址附加用户名
		   //   method: 'GET',
		   //   success: (res) => {
		   //     if (res.data.success) {
		   //       uni.showToast({
		   //         title: '反馈已成功提交',
		   //         icon: 'success',
		   //       });
		   //       this.data = res.data.data
		   //     } else { 
		   //       uni.showModal({
		   //         title: '提示',
		   //         content: '提交反馈时遇到问题，请稍后重试！',
		   //       });
		   //     }
		   //   },
		   //   fail: () => {
		   //     uni.showModal({
		   //       title: '网络错误',
		   //       content: '无法连接服务器，请检查网络连接！',
		   //     });
		   //   },
		   // });
		 },
		data() {
			return {
				data:[
					{
						name:'羽毛球001团',
						player:'周国峰',
						number:10,
						max:60
					},
					{
						name:'羽毛球002团',
						player:'李海涛',
						number:15,
						max:20
					}
				]
			}
		},
		methods: {
			goToDetailPage(item) {
				uni.navigateTo({
					url: '/pages/version1/acter_info_v1?name=' + item.name // 替换为您的详细页面路径，并传递所需参数
				});
			},
			
		}
	}
</script>

<style scoped>
.number_container{
	display: flex;
}
.number_title{
	font-size: 40rpx;
	margin-top: 30rpx;
	margin-left: 25rpx;
	color: grey;
}
.number{
	font-size: 40rpx;
	margin-top: 30rpx;
	margin-left: 60rpx;
	color: grey;
}
.player{
	font-size: 40rpx;
	margin-top: 40rpx;
	margin-left: 60rpx;
	color: grey;
}
.player_title{
	font-size: 40rpx;
	margin-top: 40rpx;
	margin-left: 25rpx;
	color: grey;
	
}
.player_container{
	display: flex;
}
.container{
	margin-top: 50rpx;
	border: 1px solid ;
	width: 600rpx;
	height: 280rpx;
	margin-left: 70rpx;
	color: grey;
}
.name{
	margin-top: 20rpx;
	margin-left: 20rpx;
	color: black;
}
</style>